package com.report.reportserver.service;

import org.springframework.boot.autoconfigure.context.LifecycleAutoConfiguration;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ ClassName: SysSqlService
 * @ Description：直接操作数据库表
 * @ Modified By：
 * @ Version:
 * @ Author     ：LiYing
 * @ Date       ：Created in 14:13 2022/4/7
 */

public interface SysSqlService {

    public boolean dropDatabaseTable(String tableName);

    public int createDatabaseTable(String sql);

    public Map getTableInfoMap(String tableName);

    public int createDatabaseTableByColName(List<String> cols, String tableName);

    public int insertData(List<List<String>> objects, List<String> cols, String tableName);

    public boolean insertDataBySql(String sql);

    public List selectTableData(String tableName);

    public String getMaxNum(String tableName, String columnName, String prefix);

    public List findListByQuerySql(String sql[], String key, List columns, List items, Map queryMap);

    public String getForeRecordLabel(String sql, Integer id);

    public List getTableNames();

    public List getSelectList(String sql);

    public List getIdNameTreeSelectList(String sql, String parentkey);

    public void addChildrenDepartment(Integer parentId, Map map, String sql, String parentkey);

    public void setSelectList(Map data, List items);

    public List transArrayToMapList(String key, List columns, List list);

    public Map findPageByQuerySql(String sql[], String key, List columns, List items, Map queryMap, Integer currentPage, Integer pageSize);

    public Map findPageByQuerySql(String sql[], String key, List columns, List items, Map queryMap, Integer currentPage);

    public Map<String, Object> findMapByKey(String tableName, String key, Integer keyId);

    public Object findDataObjectBySql(String sql, Map paras);

    public Object findDataListBySql(String sql, Map paras);

    public String updateByMapKeyOld(String tableName, String key, Integer keyId, Map data);

    public String getNextNum(String tableName, String columnName, Map formObj);

    public String updateByMapKey(String tableName, String key, Integer keyId, Map data, Map formObj, String url);

    public String updateColumnValueByKey(String tableName, String columnName, String key, Integer keyId, Object value);

    public int deleteByKey(String tableName, String key, Integer keyId, String url);
}
